Match the behavior of SystemRandomSource to System.Random#886
Match the behavior of SystemRandomSource to System.Random#886hikarin522 wants to merge 2 commits intomathnet:masterfrom
Conversation
Match the behavior of "SystemRandomSource" to "System.Random" dotnet/runtime#47085
|
Related: doesn't .NET 6 also introduce a shared Random instance? Maybe that could be useful for us also. |
|
Note, the reason we pass in a seed is to avoid the problem Random used to have when you create multiple instances very quickly they are not guaranteed to be independent (they could end up with the same seed). Is this also resolved then in .NET 6? |
When #885 is merged, I will issue the following commit pull request. |
https://docs.microsoft.com/dotnet/api/system.random.-ctor#System_Random__ctor
The |
Fixed a seed value issue in the .NET Framework.
|
Fixed. |
|
I have not merged yet because I first would like to bring out v5 which mainly changes a few things around native providers and how they are isolated, loaded an packaged (and make them work again for Linux if possible). As soon as this is out, we can finally start to move towards .NET 5 and 6. Sorry for this delay. |
In
.NET 6,new System.Random()with no arguments is changed toxoshiro256**.dotnet/runtime#47085